<template>
  <FormItem label="默认值">
    <Input v-model:value="activeComp.defaultValue" placeholder="请输入默认值" />
  </FormItem>
  <FormItem label="占位提示">
    <Input v-model:value="activeComp.__component__.placeholder" placeholder="请输入占位提示" />
  </FormItem>
  <FormItem label="最小值">
    <InputNumber
      class="!w-[100%]"
      v-model:value="activeComp.__component__.min"
      placeholder="最小值"
    />
  </FormItem>
  <FormItem label="最大值">
    <InputNumber
      class="!w-[100%]"
      v-model:value="activeComp.__component__.max"
      placeholder="最大值"
    />
  </FormItem>
  <FormItem label="步数">
    <InputNumber
      class="!w-[100%]"
      v-model:value="activeComp.__component__.step"
      placeholder="步数"
      :min="0"
    />
  </FormItem>
  <FormItem label="精度">
    <InputNumber
      class="!w-[100%]"
      v-model:value="activeComp.__component__.precision"
      placeholder="精度"
      :min="0"
    />
  </FormItem>
  <FormItem label="是否禁用">
    <Switch v-model:checked="activeComp.__component__.disabled" />
  </FormItem>
  <FormItem label="是否只读">
    <Switch v-model:checked="activeComp.__component__.readonly" />
  </FormItem>
</template>
<script lang="tsx" setup name="InputNumberOption">
  import { toRefs } from 'vue';
  import { FormItem, Input, Switch, InputNumber } from 'ant-design-vue';
  import { useFormStore } from '/@/store/modules/workFlow/form';
  const store = useFormStore();

  const { activeComp } = toRefs<any>(store);
</script>
<style lang="less" scoped></style>
